#include <bits/stdc++.h>
using namespace std;
int n;
long double a, b, ans;
long double x[2000000];
int main()
{
    freopen("temple.in", "r", stdin);
    freopen("temple.out", "w", stdout);
    scanf("%d", &n);
    for (int i = 1; i <= n; i++)
    {
        scanf("%Lf%Lf", &a, &b);
        x[i] = min(hypotl(a, b / 2), hypotl(a / 2, b));
    }
    sort(x + 1, x + n + 1, greater<>());
    a = x[1];
    for (int i = 1; i <= n; i++)
    {
        ans = max(ans, hypotl(i, a + x[i]));
        a = x[i];
    }
    printf("%.12Lf\n", ans / 2);
    return 0;
}